import request from '@/utils/request'

// 查询牛只列表
export function listCattle(query) {
  return request({
    url: '/farm/cattle/list',
    method: 'get',
    params: query
  })
}

// 查询牛只详细
export function getCattle(id) {
  return request({
    url: '/farm/cattle/' + id,
    method: 'get'
  })
}

// 新增牛只
export function addCattle(data) {
  return request({
    url: '/farm/cattle',
    method: 'post',
    data: data
  })
}

// 修改牛只
export function updateCattle(data) {
  return request({
    url: '/farm/cattle',
    method: 'put',
    data: data
  })
}

// 删除牛只
export function delCattle(id) {
  return request({
    url: '/farm/cattle/' + id,
    method: 'delete'
  })
}
